Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defined g-buffer index constants to make it easier for users to add their own g-buffers #8106

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RoyTheunissen
Copy link

Please read the Contributing guide before making a PR.

Checklist for PR maker

  • Have you added a backport label (if needed)? For example, the need-backport-* label. After you backport the PR, the label changes to backported-*. (I don't think this is necessary. It's a cleanup, not a fix)
  • Have you updated the changelog? Each package has a CHANGELOG.md file. (Is this worth mentioning in the changelog? It's not a bug fix nor a new feature. I'll add it if you think I should.)
  • Have you updated or added the documentation for your PR? When you add a new feature, change a property name, or change the behavior of a feature, it's best practice to include related documentation changes in the same PR. If you do add documentation, make sure to add the relevant Graphics Docs team member as a reviewer of the PR. If you are not sure which person to add, see the Docs team contacts sheet. (I've added comments where relevant, which should be satisfactory)
  • Have you added a graphic test for your PR (if needed)? When you add a new feature, or discover a bug that tests don't cover, please add a graphic test. (I don't know what this is exactly or whether it's needed)

Purpose of this PR

Why is this PR needed, what hard problem is it solving/fixing?

I'm a user and I tried adding a custom g-buffer to URP and it was a real pain 😂 I did a few small changes to make it easier to add a gbuffer and have the other g-buffer indices shift over correctly. I also added some comments to clarify things that I didn't understand, and I'm looking to share those for other users who wish to add g-buffers.

This is one half of changes that I made to my local version of URP to make it easier to expand SurfaceData. If this gets in, I would also like to open a PR with some small changes in shader code, SurfaceData is initialized weirdly in a few places and that cost me a lot of hours to debug, and I think that can be solved elegantly, but this is my first contribution so let's take it one step at a time.


Testing status

Describe what manual/automated tests were performed for this PR

I have triple-checked that all the values are the same as before, and I've created a test scene with both static & dynamic objects, baked lighting, and then turned a bunch of render pipeline features on and off and checked that all the g-buffers kept working correctly.

That's about as much as I could think of, but if you have any suggestions for other things to test I will happily take a look.


Comments to reviewers

It's my first contribution. I read the README and contribution guidelines but I was a bit confused about where to branch from & where to merge to exactly, so I set it to Draft so we can maybe check that first.

Thank you for your consideration 🙏

By the way I talked to @UnityAljosha during the Office Hours event on Discord and he gave me permission to open a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant